﻿@model DoAnWebsite.Models.GroupNew
@using Ext.Net
@using Ext.Net.MVC
@{
    ViewBag.Title = "Create GNews";
    Layout = "~/Views/Shared/_Layout_Admin.cshtml";
}

@section Header
{
}
@section ToolbarSection{
    @Html.X().Button().Text("Save").ID("btnSave").Disabled(true).Icon(Icon.Disk).DirectEvents(de =>
            {
                de.Click.Url = Url.Action("CreateGNews");
                de.Click.EventMask.ShowMask = true;
                de.Click.FormID = "FormPanelCreateGNews";
            })
            @**@
    
    @Html.X().Button().Text("Back").Icon(Icon.ArrowLeft).Margins("0 0 0 10").Listeners(ls => ls.Click.Handler = "window.parent.location.reload();parentAutoLoadControl.close();")
}

@Html.X().FormPanel().ID("FormPanelCreateGNews").Title("Create GroupNews").StyleSpec("position: static; z-index: 10;width: 100%;").Layout(LayoutType.Form).AutoScroll(true).Anchor("100% 100%").Listeners(
ls => ls.ValidityChange.Handler = "App.btnSave.setDisabled(!valid)").Items(
        Html.X().TextFieldFor(m => m.GNName).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().TextFieldFor(m => m.Title).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().HtmlEditorFor(m => m.Description).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().TextFieldFor(m => m.Keyword).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 30px 100px").Flex(1)
)